home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #11 / Amiga Plus CD - 2002 - No. 11.iso / Tools / Development / PowerD / powerd / modules.lha / modules / gadgets / layout.m < prev    next >
Encoding:
Text File  |  2001-10-28  |  13.2 KB  |  280 lines

  1. /*
  2. **  $VER: layout.h 44.1 (19.10.1999)
  3. **  Includes Release 44.1
  4. **
  5. **  Definitions for the layout.gadget BOOPSI class
  6. **
  7. **  (C) Copyright 1987-1999 Amiga, Inc.
  8. **      All Rights Reserved
  9. */
  10. /*****************************************************************************/
  11. MODULE 'intuition/gadgetclass','images/bevel'
  12. /*****************************************************************************/
  13. OBJECT WeightObject             /* filled in by layout.gadget for weighbar */
  14.   wb_SuccHeight:ULONG,
  15.   wb_PredHeight:ULONG,
  16.   wb_Reserved1:ULONG,     // currently unused.
  17.   wb_SuccWidth:ULONG,
  18.   wb_PredWidth:ULONG,
  19.   wb_Reserved2:ULONG      // currently unused.
  20.  
  21. /*****************************************************************************/
  22. OBJECT LayoutLimits            /* filled by the LayoutLimits() call */
  23.   MinWidth:UWORD,
  24.   MinHeight:UWORD,
  25.   MaxWidth:UWORD,
  26.   MaxHeight:UWORD
  27.  
  28. /*****************************************************************************/
  29. #define LAYOUT_Dummy      (REACTION_Dummy+0x7000)
  30. #define LAYOUT_Orientation    (LAYOUT_Dummy+1)
  31. /* (ULONG) Orientation of group, LAYOUT_ORIENT_HORIZ or
  32.    * LAYOUT_ORIENT_VERT.  Defaults to LAYOUT_ORIENT_HORIZ. */
  33. #define LAYOUT_FixedHoriz     (LAYOUT_Dummy+2)
  34. #define LAYOUT_FixedVert    (LAYOUT_Dummy+3)
  35. /* (BOOL) TRUE for fixed-size group, false to force that direction to its
  36.    * smallest possible size. */
  37. #define LAYOUT_HorizAlignment   (LAYOUT_Dummy+4)
  38. /* (ULONG) Align to left, right, or center of group space, defaults to
  39.    * LAYOUT_ALIGN_LEFT. */
  40. #define LAYOUT_VertAlignment  (LAYOUT_Dummy+5)
  41. /* (ULONG) Align to top, bottom, or center of group space, defaults to
  42.    * LAYOUT_ALIGN_TOP. */
  43. #define LAYOUT_ShrinkWrap     (LAYOUT_Dummy+6)
  44. /* (BOOL) Shrink out all extra space between gadgets. Default FALSE. */
  45. #define LAYOUT_EvenSize       (LAYOUT_Dummy+7)
  46. /* (BOOL) Use the minimum size of the largest child for all children.
  47.    * Default FALSE. */
  48. #define LAYOUT_InnerSpacing     (LAYOUT_Dummy+9)
  49. /* (ULONG) Spacing between objects. Defaults to INTERSPACING.
  50.    */
  51. #define LAYOUT_HorizSpacing  LAYOUT_InnerSpacing  /* OBSOLETE */
  52. #define LAYOUT_VertSpacing  LAYOUT_InnerSpacing
  53. #define INTERSPACING  4   /* virtual pixels */
  54. #define INTERSPACE  INTERSPACING
  55. #define LAYOUT_TopSpacing        (LAYOUT_Dummy+10)
  56. /* (ULONG) The minimum space between the top of the group, and the top of
  57.    * the objects inside it. */
  58. #define LAYOUT_BottomSpacing     (LAYOUT_Dummy+11)
  59. /* (ULONG) The minimum space between the bottom of the group, and the
  60.    * bottom of the objects inside it. */
  61. #define LAYOUT_LeftSpacing       (LAYOUT_Dummy+12)
  62. /* (ULONG) The minimum space between the left side of the group, and the
  63.    * left side of the objects inside it. */
  64. #define LAYOUT_RightSpacing      (LAYOUT_Dummy+13)
  65. /* (ULONG) The minimum space between the right side of the group, and the
  66.    * right side of the object inside it. */
  67. #define LAYOUT_BevelState        (LAYOUT_Dummy+14)
  68. /* (ULONG) Either IDS_SELECTED for recessed, or IDS_NORMAL for raised. */
  69. #define LAYOUT_BevelStyle        (LAYOUT_Dummy+15)
  70. /* (ULONG) See images/bevel.h */
  71. #define LAYOUT_Label             (LAYOUT_Dummy+16)
  72. /* (UBYTE *) The bevel label, as specified by a text string. */
  73. #define LAYOUT_LabelImage        (LAYOUT_Dummy+17)
  74. /* (struct Image *) The bevel label, as specified by an Image. */
  75. #define LAYOUT_LabelPlace        (LAYOUT_Dummy+18)
  76. /* (ULONG) Where to put the label: BVJ_TOP_CENTER, BVJ_TOP_LEFT,
  77.    * BVJ_TOP_RIGHT, BVJ_IN_CENTER, BVJ_IN_LEFT, BVJ_IN_RIGHT */
  78. /* The child functions.
  79.  * After one of these functions is called, any CHILD_ tag may be used; it will apply
  80.  * to whichever gadget was the last gadget to be altered by AddGadget/ModifyChild.
  81.  */
  82. #define LAYOUT_RemoveChild       (LAYOUT_Dummy+19)
  83. /* (Object *) The BOOPSI gadget to be removed.  This will destroy the
  84.    * object, as well. */
  85. #define LAYOUT_AddChild          (LAYOUT_Dummy+20)
  86. /* (Object *) The BOOPSI gadget to be added. */
  87. #define LAYOUT_AddImage          (LAYOUT_Dummy+21)
  88. /* (Object *) like LAYOUT_AddChild, except for images instead of
  89.    * gadgets. */
  90. #define LAYOUT_ModifyChild       (LAYOUT_Dummy+22)
  91. /* (Object *) The BOOPSI gadget to be modified. */
  92. /* The following two tags, together with GA_ID, are sent in a notification
  93.  * message when a gadget informs of a release verify.
  94.  */
  95. #define LAYOUT_RelVerify    (LAYOUT_Dummy+23)
  96. /* (BOOL) Gadget release verify notification tag */
  97. #define LAYOUT_RelCode      (LAYOUT_Dummy+24)
  98. /* (UWORD) Copy of the IntuiMessage.Code from the release verify */
  99. #define LAYOUT_Parent       (LAYOUT_Dummy+25)
  100. /* (Object *) Set the parent layout of a sublayout. Layout will set this
  101.    * automatically for all children (thus any object added to a layout
  102.    * hierarchy will receive this tag in OM_SET). */
  103. #define LAYOUT_DeferLayout    (LAYOUT_Dummy+26)
  104. /* (BOOL) Setting this tag for a top layout will make it defer GM_LAYOUT
  105.    * and GM_RENDER from input.device context and request the application to
  106.    * do them. */
  107. #define LAYOUT_RequestLayout  (LAYOUT_Dummy+27)
  108. /* (Object *) When this tag is received in OM_UPDATE or IDCMP_IDCMPUPDATE,
  109.    * the layout instance in question should be relayouted with the GM_LAYOUT
  110.    * method (or by calling RethinkLayout).  Setting LAYOUT_DeferLayout will
  111.    * make these notifications appear. */
  112. #define LAYOUT_RequestRefresh   (LAYOUT_Dummy+28)
  113. /* (Object *) When this tag is received in OM_UPDATE or IDCMP_IDCMPUPDATE,
  114.    * the layout instance in question should be refreshed with the GM_RENDER
  115.    * method (or by calling RefreshGList).  Setting LAYOUT_DeferLayout will
  116.    * make these notifications appear. */
  117. #define LAYOUT_TextPen      (LAYOUT_Dummy+29)
  118. /* (WORD) Optional text pen color for group label */
  119. #define LAYOUT_FillPen      (LAYOUT_Dummy+30)
  120. /* (WORD) Optional backfill pen color */
  121. #define LAYOUT_FillPattern    (LAYOUT_Dummy+31)
  122. /* (UWORD *) Optional backfill pattern */
  123. #define LAYOUT_PageBackFill     (LAYOUT_Dummy+32)
  124. /* (struct Hook *) !PRIVATE! backfill hook */
  125. #define LAYOUT_BackFill       GA_BackFill
  126. /* (struct Hook *) Optional backfill hook */
  127. #define LAYOUT_TabVerify    (LAYOUT_Dummy+33)
  128. /* (BOOL) TRUE if this release verify was triggered with tabcycling and
  129.    * another gadget has been activated */
  130. #define LAYOUT_LabelColumn    (LAYOUT_Dummy+34)
  131. /* (ULONG) LABELTEXT_LEFT or LABELTEXT_RIGHT, the side where object
  132.    * labels are placed in a vertical group. */
  133. #define LAYOUT_LabelWidth     (LAYOUT_Dummy+35)
  134. /* (ULONG) Width of the the gadget label column. This attribute
  135.    * can be used to justify several layout groups. */
  136. #define LAYOUT_AlignLabels    (LAYOUT_Dummy+36)
  137. /* (Object *) Pointer to another layout object this group should
  138.    * align labels width. Set a cyclic pointer between all the objects
  139.    * and they will automatically make their label columns the same
  140.    * width. These tags should be set as soon as possible, preferably
  141.    * during OM_NEW (One will have to be set afterwards). */
  142. #define LAYOUT_SpaceInner     (LAYOUT_Dummy+37)
  143. #define LAYOUT_SpaceOuter   (LAYOUT_Dummy+38)
  144. /* (BOOL) Whether or not this group should have space around/between
  145.    * objects. For normal layouts, you should use these tags instead
  146.    * of the direct-control LAYOUT_Top/Bottom/Right/Left/InnerSpacing,
  147.    * since these can be automatically adjusted to the resolution
  148.    * for you. */
  149. #define LAYOUT_RelAddress     (LAYOUT_Dummy+39)
  150. /* (struct Gadget *) The address of the gadget that sent a release
  151.    * verify. */
  152. #define LAYOUT_HelpHit      (LAYOUT_Dummy+40)
  153. /* (UWORD) HelpTest return code.
  154.    */
  155. #define LAYOUT_HelpGadget     (LAYOUT_Dummy+41)
  156. /* (struct Gadget *) HelpTest gadget pointer notified with HelpHit! (V44)
  157.    * (OM_NOTIFY)
  158.    */
  159. #define LAYOUT_DisposeLabels  (LAYOUT_Dummy)  /* Was +41!! */
  160. /* (BOOL) Dispose Labels on exit (OBSOLETE!)
  161.    * (OM_SET/OM_UPDATE)
  162.    */
  163. #define LAYOUT_Inverted      (LAYOUT_Dummy+42)
  164. /* (BOOL) Add group children via AddHead() rather than AddTail()
  165.    * A very simple means to flip a layout group placement (42.25+)
  166.      * Its also highly useful for dynamic layout, inserting the
  167.      * child on the head, or tail (left/right, top/bottom). Changing
  168.      * this tag only effects children added afterward.
  169.    */
  170. #define LAYOUT_WeightBar     (LAYOUT_Dummy+43)
  171. /* (BOOL) Place a user adjustable weighting bar here (ie; balance group bar)
  172.    *  ClassAct 2.1 - V43.1
  173.    */
  174. /* Child tags!
  175.  */
  176. #define CHILD_Dummy         (LAYOUT_Dummy+0x100)
  177. #define CHILD_MinWidth           (CHILD_Dummy+1)
  178. /* (ULONG) The minimum width, in pixels, of the object.  Leave blank if
  179.    * you want the minimum size to be calced by the gadget as the smallest
  180.    * possible, or use ~0.  Defaults to ~0. */
  181. #define CHILD_MinHeight          (CHILD_Dummy+2)
  182. /* (ULONG) The minimum height, in pixels, of the object.  Leave blank if
  183.    * you want the minimum size to be calced by the gadget as the smallest
  184.    * possible, or use ~0.  Defaults to ~0. */
  185. #define CHILD_NominalSize     (CHILD_Dummy+11)
  186. /* (BOOL) Use GDOMAIN_NOMINAL instead of GDOMAIN_MINIMUM to request
  187.    * minimum size.  Defaults to FALSE. */
  188. #define CHILD_MaxWidth      (CHILD_Dummy+3)
  189. /* (ULONG) The maximum width, in pixels, of the object.  Leave blank if
  190.    * you want the maximum size to be calced by the gadget as the largest
  191.    * possible, or use ~0. */
  192. #define CHILD_MaxHeight          (CHILD_Dummy+4)
  193. /* (ULONG) The maximum height, in pixels, of the object.  Leave blank if
  194.    * you want the maximum size to be calced by the gadget as the smallest
  195.    * possible, or use ~0. */
  196. #define CHILD_WeightedWidth      (CHILD_Dummy+5)
  197. /* (ULONG) See CHILD_WeightedHeight. */
  198. #define CHILD_WeightedHeight     (CHILD_Dummy+6)
  199. /* (ULONG) The weighted width or height is a number between 0 and 100;
  200.    * it determines how much space, in relation to the other objects in the
  201.    * group, this particular object should be allowed.  When the width/height
  202.    * for the group is calculated, the allowable space is divided up between
  203.    * the gadgets based on this, and the min/max values.  For instance, if
  204.    * you had two objects, one with a weight of 100 and another with a weight
  205.    * of 50, and the group was 150 pixels wide, 100 would be offered to the
  206.    * first, and 50 to the second; how much space it actually takes depends
  207.    * on whether that particular value exceeds the maximum, the minimum, or
  208.    * the gadget's internal calculations of its minimum or maximum possible
  209.    * width or height.  Both CHILD_WeightedWidth and CHILD_WeightedHeight
  210.    * default to 100.  A value of 0 locks it at the CHILD_MinWidth or
  211.    * CHILD_MinHeight value, respectively. */
  212. #define CHILD_ReplaceObject        (CHILD_Dummy+7)
  213. /* (Object *) The BOOPSI gadget to replace the object with.  The original
  214.    * object is destroyed. */
  215. #define CHILD_ReplaceImage         (LAYOUT_Dummy+8)
  216. /* (Object *) Like CHILD_ReplaceObject, except the replacement object is
  217.    * an image, not a gadget. */
  218. #define CHILD_CacheDomain          (CHILD_Dummy+9)
  219. /* (BOOL) Whether GM_DOMAIN results can be cached to improve performance.
  220.    * Set this to FALSE if you use weird gadgets that can change size on
  221.    * their own. Defaults to TRUE. */
  222. #define CHILD_WeightMinimum     (CHILD_Dummy+10)
  223. /* (BOOL) Makes layout set the weighted size to the values returned by
  224.    * minimum GM_DOMAIN. */
  225. #define CHILD_Label         (CHILD_Dummy+12)
  226. /* (Object *) A label.image to use as the label for this gadget */
  227. #define CHILD_NoDispose       (CHILD_Dummy+13)
  228. /* (BOOL) Set this to true if you don't want layout to automatically
  229.    * dispose the object. */
  230. #define CHILD_ScaleHeight        (CHILD_Dummy+14)
  231. /* (UWORD) Scales min domain size larger by this percentage (0 thru 100). */
  232. #define CHILD_ScaleWidth         (CHILD_Dummy+15)
  233. /* (UWORD See CHILD_ScaleHeight. */
  234. #define CHILD_DataType           (CHILD_Dummy+16)
  235. /* (BOOL) This is a datatype, layout will use DTM_PROCLAYOUT,
  236.    * SetDTAttrs and RefreshDTObject so waiting for DTA_Sync is not
  237.    * required. (V43 BETA) */
  238. /*****************************************************************************/
  239. /* Special "empty label" value for CHILD_Label
  240.  */
  241. #define LCLABEL_NOLABEL     (1)
  242. /* Possible values for LAYOUT_Orientation.
  243.  */
  244. #define LAYOUT_HORIZONTAL   0
  245. #define LAYOUT_VERTICAL     1
  246. #define LAYOUT_ORIENT_HORIZ   LAYOUT_HORIZONTAL
  247. #define LAYOUT_ORIENT_VERT  LAYOUT_VERTICAL
  248. /* Possible values for LAYOUT_HorizAlignment.
  249.  */
  250. #define LALIGN_LEFT     0
  251. #define LALIGN_RIGHT  1
  252. #define LALIGN_CENTER   2
  253. #define LALIGN_CENTRE   LALIGN_CENTER
  254. #define LAYOUT_ALIGN_LEFT   LALIGN_LEFT
  255. #define LAYOUT_ALIGN_RIGHT  LALIGN_RIGHT
  256. #define LAYOUT_ALIGN_CENTER   LALIGN_CENTER
  257. /* Possible values for LAYOUT_VertAlignment.
  258.  */
  259. #define LALIGN_TOP    0
  260. #define LALIGN_BOTTOM   1
  261. #define LALIGN_CENTER   2
  262. #define LALIGN_CENTRE   LALIGN_CENTER
  263. #define LAYOUT_ALIGN_TOP  LALIGN_TOP
  264. #define LAYOUT_ALIGN_BOTTOM   LALIGN_BOTTOM
  265. #define LAYOUT_ALIGN_CENTER   LALIGN_CENTER
  266. /*****************************************************************************/
  267. /* Page Class tags  */
  268. #define PAGE_Dummy        (LAYOUT_Dummy+0x200)
  269. #define PAGE_Add        (PAGE_Dummy+1)
  270. /* (Object *) Add a page to the end of a page group */
  271. #define PAGE_Remove         (PAGE_Dummy+2)
  272. /* (Object *) Remove a page from the page group */
  273. #define PAGE_Current      (PAGE_Dummy+3)
  274. /* (ULONG) Make the n'th page visible. */
  275. #define PAGE_FixedVert      (PAGE_Dummy+4)
  276. #define PAGE_FixedHoriz       (PAGE_Dummy+5)
  277. /* (BOOL) Like the Layout class tags. */
  278. #define PAGE_Transparent    (PAGE_Dummy+6)
  279. /* (BOOL) PRIVATE */
  280.